<?php

/**
 * Horario form base class.
 *
 * @method Horario getObject() Returns the current form's model object
 *
 * @package    blackDrums
 * @subpackage form
 * @author     your name here
 */
abstract class BaseHorarioForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'idHorario'  => new sfWidgetFormInputHidden(),
      'horaInicio' => new sfWidgetFormTime(),
      'horaFin'    => new sfWidgetFormTime(),
      'dia'        => new sfWidgetFormInputText(),
      'idSala'     => new sfWidgetFormPropelChoice(array('model' => 'Sala', 'add_empty' => false)),
    ));

    $this->setValidators(array(
      'idHorario'  => new sfValidatorPropelChoice(array('model' => 'Horario', 'column' => 'idHorario', 'required' => false)),
      'horaInicio' => new sfValidatorTime(),
      'horaFin'    => new sfValidatorTime(),
      'dia'        => new sfValidatorString(array('max_length' => 20)),
      'idSala'     => new sfValidatorPropelChoice(array('model' => 'Sala', 'column' => 'idSala')),
    ));

    $this->widgetSchema->setNameFormat('horario[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Horario';
  }


}
